package com.zb.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author WEN
 * @Date 2023/8/16 0016
 **/
@Data
@ApiModel("商品规格对象")
public class GoodsSpecInfoVo {
    @ApiModelProperty(value = "规格ID，新增不必传，修改必传")
    private Long id;

    @NotBlank(message = "规格名称不能为空")
    @Length(max = 200, message = "规格名称限制200个字符以内")
    @ApiModelProperty(value = "规格名称", required = true)
    private String name;

    @NotNull(message = "启用状态不能为空")
    @ApiModelProperty(value = "启用状态：false-不启用，true-启用", required = true, example = "true")
    private Boolean enabled;

    @Length(max = 300, message = "单位规格图片路径限制 300 个字符以内")
    @ApiModelProperty(value = "规格图片路径")
    private String image;

    @NotNull(message = "价格不能为空")
    @ApiModelProperty(value = "价格", required = true, example = "0.0")
    private BigDecimal price;

    @NotNull(message = "过保价格不能为空")
    @ApiModelProperty(value = "过保价格", required = true, example = "0.0")
    private BigDecimal overPrice;

    @NotNull(message = "质保周期/天数不能为空")
    @ApiModelProperty(value = "质保周期/天数", required = true, example = "30")
    private Integer warrantyDay;

    @Length(message = "SKU编码限制60个字符以内")
    @ApiModelProperty(value = "SKU编码，不填则系统生成")
    private String code;
}
